package cn.buddha.jesw.flux;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * @ClassName SpringWebFluxApp
 * @Author 友野浩二
 * @Date 2019/11/19 13:19
 * @Description webflux
 * @Version 1.0
 */
@SpringBootApplication
@Slf4j
@RestController
public class SpringWebFluxApp {

    public static void main(String[] args) {
        SpringApplication.run(SpringWebFluxApp.class, args);
        log.info("<<<<======== Tong Spring WebFlux Started! ========>>>>");
    }

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public Mono<String> home() {
        return Mono.just("I'm Tong Spring WebFlux!");
    }

}
